<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>
	<canvas id="canvas" width="1024" height="768" style="border: 1px solid #aaa; display: block; margin: auto auto">
		<!--兼容降错-->
		当前浏览器不支持 Canvas，请更换浏览器后再试
	</canvas>

	<script>
	window.onload = function () {
		const canvas = document.getElementById('canvas')
		const context = canvas.getContext('2d')

		context.lineWidth = 5
		context.strokeStyle = '#005588'

		// 不连续弧
		for (let i = 0; i < 10; i++) {
			context.beginPath()
			context.arc(50 + i*100, 60, 40, 0, 2*Math.PI*(i+1)/10)
			context.closePath()
			context.stroke()
		}

		// 连续弧
		for (let i = 0; i < 10; i++) {
			context.beginPath()
			context.arc(50 + i*100, 180, 40, 0, 2*Math.PI*(i+1)/10)
			context.stroke()
		}
	}
	</script>
</body>
</html>
